package com.complaint.rest.service;

import com.complaint.rest.model.User;
import com.complaint.rest.rc.RestClient;
import org.springframework.stereotype.Service;

/**
 * Created by Alex
 */
@Service
public class UserServiceImpl implements UserService {

    @Override
    public User addUser(User user) {
        return RestClient.get().addUser(user);
    }

    @Override
    public void removeUser(User user) {
        RestClient.get().removeUser(user);
    }

    @Override
    public User updateUser(User user) {
        return RestClient.get().updateUser(user);
    }

    @Override
    public User getUser(String id) {
        return RestClient.get().getUser(id);
    }

    @Override
    public User getUserByEmail(String email) {
        return RestClient.get().getUserByEmail(email);
    }
}
